<?php
header('content-type:text/html;charset=utf-8');
//二维数组的遍历
$banji=array(
    1=>array('name'=>'张三','sex'=>'男','age'=>18),
    2=>array('name'=>'李四','sex'=>'男','age'=>19),
    3=>array('name'=>'王五','sex'=>'女','age'=>20),
);
echo'<table border=1>';
echo '<tr>';
foreach ($banji as $student){
echo '<tr>';
foreach ($student as $v){
echo '<td>'.$v.'</td>';
}
echo '<tr>';
}
echo '</table>';
?>
<!doctype html>
<html>
<head>
<title>   </title>
<style>
  body{text-align:center;}  
  .title{background:#ccc;}
  table{height:200px;width:200px;font-size:12px;text-align:center;float:left;margin:10px;font-family:arial;background-color:#99CCFF;}
</style>
</head>
<body>
</body>
</html>

